package com.chen.springboot.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.io.Serializable;

/**
 * @author chenchao
 * @date 2022/6/17 13:37
 * 海报封面
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@TableName("poster")
@ApiModel("海报封面")
public class Poster implements Serializable {
    @TableId(type = IdType.AUTO)
    @ApiModelProperty("ID")
    @NotNull(message = "海报id不能为空")
    private Integer id;  //主键id

    @ApiModelProperty(value ="封面")
    @NotBlank(message = "封面不能为空")
    private String images;

    @ApiModelProperty(value ="描述")
    private String comment;

    @ApiModelProperty(value ="是否启用")
     private boolean enable;


    @TableField(value="is_delete")
    @ApiModelProperty(value ="是否删除")
    private Integer isDelete;

    @ApiModelProperty(value ="排序")
    private int sort;

    @ApiModelProperty(value ="海报大小")
    private long size;

    @ApiModelProperty(value ="海报类型")
    private String type;

    @ApiModelProperty(value ="说明")
    private String explains;

    @ApiModelProperty(value="登录注册封面")
    @TableField(value="cover_url")
    private boolean coverUrl;


}
